@if ($paginator->hasPages())
    <div class="page">
        <div>
            <div>共有{{$paginator->total()}}题，本页有{{$paginator->count()}}题</div>
            <div style="margin: 10px 0;">
                @if ($paginator->onFirstPage())
                    <a class="layui-btn layui-btn-sm layui-btn-warm">第一页</a>
                @else
                <a href="{{ $paginator->previousPageUrl() }}" class="layui-btn layui-btn-sm layui-btn-warm">上一页</a>
                @endif
                    @if ($paginator->hasMorePages())
                <a href="{{ $paginator->nextPageUrl() }}" class="layui-btn layui-btn-sm layui-btn-danger" style="float: right">下一页</a>
                    @else
                        <a class="layui-btn layui-btn-sm layui-btn-danger" style="float: right">下一页</a>
                    @endif
            </div>


            @foreach ($elements as $element)
                @if (is_string($element))
                    <span class="current">{{ $element }}</span>
                @endif
                @if (is_array($element))
                    @foreach ($element as $page => $url)
                        @if ($page == $paginator->currentPage())
                            <span class="current  layui-badge layui-bg-orange">{{ $page }}</span>
                        @else
                            <a class="num layui-badge" href="{{ $url }}">{{ $page }}</a>
                        @endif
                    @endforeach
                @endif
            @endforeach
        </div>
    </div>
@endif
